package io.github.talelin.latticy.dto.oms.inbound_order;

import com.baomidou.mybatisplus.annotation.TableName;
import io.github.talelin.latticy.common.enumeration.InboundOrderBoxModelEnum;
import io.github.talelin.latticy.common.pojo.BaseDO;
import io.github.talelin.latticy.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.Valid;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

/**
 * @author generator@TaleLin
 * @since 2022-05-18
 */
@Data
@NoArgsConstructor
public class InboundPackagesDTO extends BaseDO {

    /**
     * 入库单id
     */
    private String inboundOrderNo;

    /**
     * 箱子型号(1.大 2.中 3.小 4.特大)
     */
    @NotNull(message = "{packages.boxModel.not-empty}")
    private InboundOrderBoxModelEnum boxModel;


    /**
     * 尺寸单位类型 (1.cm 2.in)
     */
    @NotNull(message = "{packages.distanceUnit.not-empty}")
    private Integer distanceUnit;

    /**
     * 重量单位类型 1.kg 2.lb/oz
     */
    @NotNull(message = "{packages.massUnit.not-empty}")
    private Integer massUnit;

    /**
     * 箱子数量
     */
    @NotNull(message = "{packages.quantity.not-empty}")
    private Integer quantity;

    /**
     * 单箱重量
     */
    private BigDecimal weight;


    /**
     * 物流跟踪号(用英文,号分割)
     */
    private String trackingNumber;



    /**
     * 长
     */
    @NotNull(message = "{packages.length.not-empty}")
    private BigDecimal length;

    /**
     * 宽
     */
    @NotNull(message = "{packages.height.not-empty}")
    private BigDecimal height;

    /**
     * 高
     */
    @NotNull(message = "{packages.width.not-empty}")
    private BigDecimal width;

    /**
     * 备注
     */
    private String otherRemark;

    /**
     * 入库打包单子项表
     */
    @NotEmpty(message = "{packages.inboundPackagesItemsList.not-empty}")
    @Valid
    private List<InboundPackagesItemsDTO> inboundPackagesItemsList;
}
